//
//  SettingsViewController.m
//  HJZWeiBo
//
//  Created by 蒋晨成 on 16/5/30.
//  Copyright © 2016年 蒋晨成. All rights reserved.
//

#import "SettingsViewController.h"

@interface SettingsViewController ()<WBHttpRequestDelegate>

@end

@implementation SettingsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *registButton = [UIButton buttonWithType:UIButtonTypeSystem];
    registButton.frame = CGRectMake(100, 100, 100, 100);
    [registButton setTitle:@"注销" forState:UIControlStateNormal];
    [self.view addSubview:registButton];
    [registButton addTarget:self action:@selector(registButtonAction:) forControlEvents:UIControlEventTouchUpInside];
    
    
    

    
}

- (void)registButtonAction:(UIButton *)button {
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"accessToken"];
    [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"userID"];
    if (self.block) {
         self.block();
    }
   
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
